package com.xinyin.aiqinhaiback.exception;


import com.xinyin.aiqinhaiback.common.Enum.ResultEnum;

public class MyException extends RuntimeException {
    private Integer code;

    public MyException(ResultEnum userResponseEnum){
        super(userResponseEnum.getMsg());
        this.code = userResponseEnum.getCode();
    }

    public MyException(String msg,Integer code){
        super(msg);
        this.code =code;
    }
    public MyException(Integer code,String msg){
        super(msg);
        this.code =code;
    }


    public Integer getCode() {
        return code;
    }


}
